<?php
include 'services.php';
$services=services::getInstance();

if (empty($_GET['c']))
    exit("请求地址错误！");
switch ($_GET['c']) {
    case 'addsubject':
        exit($services->addsubject());
        break;

    case 'addexaminee':
        exit($services->addexaminee());
        break;

    case 'addfile':
        exit($services->addfile());
        break;

    case 'editsubject':
        exit($services->editsubject());
        break;

    case 'editexaminee':
        exit($services->editexaminee());
        break;

    case 'editfile':
        exit($services->editfile());
        break;

    case 'delsubject':
        exit($services->delsubject());
        break;

    case 'delexaminee':
        exit($services->delexaminee());
        break;

    case 'delfile':
        exit($services->delfile());
        break;

    case 'getsubject':
        exit($services->getsubject());
        break;

    case 'getexaminee':
        exit($services->getexaminee());
        break;

    case 'getfile':
        exit($services->getfile());
        break;

    case 'login':
        exit($services->loginadmin());
        break;

    default:
        exit('请求地址错误！');
        break;
}
